const express = require("express");
const cors = require("cors");
const bodyParser = require("body-parser");
const app = express();
app.use(cors());
app.use(bodyParser.json()); // 解析application/json
app.use(bodyParser.text()); // 解析application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: true })); // 解析application/json

app.post("/reportData", (req, res) => {
  console.log(req.body);
  res.status(200).send("ok");
});

app.listen(9000, () => {
  console.log("server is running on port 9000");
});
